{extend name="base:base" /}
{block name="body"}
<link rel="stylesheet" href="__THEME__/css/inner.css" />
<div class="bread">
    <div class="bread_text wrap">
        <span>当前位置：<a href="javascript:;">首页</a>
            <?php
            $bread = help_breadcrumb_article($id);
            foreach ($bread as $key => $value) {
                ?>
                <span>&gt;</span> <a href="<?php echo my_url('index/index/lists_article?id=' . $key); ?>"><?php echo $value; ?></a>
            <?php } ?>
    </div>
</div>
<!--inner start -->
<div class="inner wrap clearfix">
    <aside class="left">
        <div class="navbox">
            <div class="nav-title">
                <h2>新闻中心</h2>
                <span class="icon_dot"></span>
            </div>
            <div class="nav-con">
                <?php
                $path = db('article_cat')->where('id', $id)->value('path');
                $category = db('article_cat')->where('path', 'LIKE', '' . $path . '%')->where('id', '<>', $id)->select();
                // 转多维
                $category = node_merge($category, null, $id);
                foreach ($category as $key => $value) {
                    ?>
                    <dl>
                        <dt class="selected"><span class="common-img flex minus"></span><a href="<?php echo my_url('index/index/lists_article?id=' . $value['id']) ?>"><?php echo $value['title'] ?></a> </dt>
                        <div class="su_leftmenu">
                            <?php
                            foreach ($value['child'] as $key2 => $value2) {
                                ?>
                                <dd <?php
                                if (request()->get('id') == $value2['id']) {
                                    echo 'class="left_navactive"';
                                }
                                ?>>
                                    <a href="<?php echo my_url('index/index/lists_article?id=' . $value2['id']) ?>"><?php echo $value2['title'] ?></a>
                                </dd>
                            <?php } ?>
                        </div>
                    </dl>
                <?php } ?>
            </div>
        </div>
    </aside>
    <div class="right">
        <div class="title"><h1><?php echo $title; ?></h1>
        </div>
        <div class="content">
            <div class="news-list">
                <?php
                foreach ($lists as $key => $value) {
                    ?>
                    <figure class="clearfix">
                        <a class="news-pic" href="javascript:;"><img src="<?php echo img_resize($value['image'], 200, 200) ?>" alt="连平县变电站"  border="0"></a>
                        <figcaption>
                            <h2 class="news-title">
                                <a href="<?php echo my_url('index/index/views_article?id=' . $value['id']) ?>" title="连平县变电站"><?php echo $value['title'] ?></a>
                            </h2>
                            <time><?php echo $value['create_time'] ?> </time>
                            <p class="news-summary">
                                <?php echo $value['description'] ?><a href="<?php echo my_url('index/index/views_article?id=' . $value['id']) ?>" class="more">[详细]</a>
                            </p>
                        </figcaption>
                    </figure>
                <?php } ?>
            </div>
            <!-- 分页 -->
            <div class="page hidden_xs clearfix">
                <?php echo $pager; ?>
            </div>
            <!-- 手机版pages-->
            <div class="phone_page hidden_lg">
                <a href="javascript:;">上一页</a>    
                <a href="javascript:;" class="active">下一页</a>    
            </div>
        </div>
    </div>
</div>
<!--inner end-->
{/block}